{{#if (eq type "code")}}
    <div class="{{b 'attachment__text-container' fullscreen=fullScreen}}">
        <pre class="attachment__code">{{content}}</pre>
    </div>
{{else if (eq type "text")}}
    <div class="{{b 'attachment__text-container' fullscreen=fullScreen}}">
        <pre class="attachment__text">{{content}}</pre>
    </div>
{{else if (eq type "table")}}
    <div class="{{b 'attachment__table-container' fullscreen=fullScreen}}">
        <table class="table attachment__table">
            <tbody>
            {{#each content}}
                <tr>
                    {{#each .}}
                        <td>{{.}}</td>
                    {{/each}}
                </tr>
            {{/each}}
            </tbody>
        </table>
    </div>
{{else if (eq type "image")}}
    <div class="{{b 'attachment__media-container' fullscreen=fullScreen}}"><img class="attachment__media" src="{{sourceUrl}}"/>
    </div>
{{else if (eq type "svg")}}
    <object class="attachment__embed" type="image/svg+xml" data="{{sourceUrl}}">
        Your browser does not support SVG
    </object>
{{else if (eq type "video")}}
    <div class="attachment__media-container">
        <video class="attachment__media" controls>
            <source src="{{sourceUrl}}" type="{{attachment.type}}">
            Your browser does not support video tag
        </video>
    </div>
{{else if (eq type "uri")}}
    <div class="{{b 'attachment__text-container' fullscreen=fullScreen}}">
        {{#each content}}
            <p class="{{b 'attachment' 'url' comment=comment}}">
                {{#if comment}}
                    {{text}}
                {{else}}
                    <a href="{{text}}" target="_blank" class="link">{{text}}</a>
                {{/if}}
            </p>
        {{/each}}
    </div>
{{else if (eq type "html")}}
        <iframe class="{{b 'attachment__iframe' fullscreen=fullScreen}}" frameborder="0" src="{{sourceUrl}}"></iframe>
{{else}}
    <div class="{{b 'attachment__text-container' fullscreen=fullScreen}}">
        <span class="fa fa-download"></span>
        <a class="link" href="{{sourceUrl}}" download>Click to download attachment</a>
    </div>
{{/if}}
